package com.ruoyi.energy.controller;

import com.alibaba.nacos.shaded.com.google.common.collect.Maps;
import com.ruoyi.common.core.web.controller.BaseController;
import com.ruoyi.common.core.web.domain.AjaxResult;
import com.ruoyi.energy.entity.EnergyCalculateDataDto;
import com.ruoyi.energy.query.EnergyEconomyQuery;
import org.apache.commons.compress.utils.Lists;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

/**
 * 节能分析
 */
@RequestMapping
@RestController
public class EnergyEconomyController extends BaseController {

    /**
     * 节能统计
     * @param query
     * @return
     */
    @GetMapping("/energyEconomy/getEnergyCalculateData")
    public AjaxResult getEnergyCalculateData(@RequestBody EnergyEconomyQuery query){
        Map map = Maps.newHashMap();
        // 电能总览 资产耗电数据
        List<EnergyCalculateDataDto> list = Lists.newArrayList();
        list.add(new EnergyCalculateDataDto());
        map.put("datas",list);

        // 电能总览
        // 节约电能
        map.put("totalEconomy","");
        // 节约电价
        map.put("totalEconomyPrice","");
        // 总耗电能
        map.put("totalEnergy","");
        // 总耗电价
        map.put("totalEnergyPrice","");
        return AjaxResult.success(map);
    }

    /**
     * 节能总览
     * @param query
     * @return
     */
    @GetMapping("/energyEconomy/getEnergyConservationData")
    public AjaxResult getEnergyConservationData(@RequestBody EnergyEconomyQuery query){
        List<EnergyCalculateDataDto> list = Lists.newArrayList();
        list.add(new EnergyCalculateDataDto());
        return AjaxResult.success(list);
    }


}
